# coding: utf-8
from sqlalchemy import Column, DateTime, Integer, String
from sqlalchemy.schema import FetchedValue
from application import db


class ErpMenu(db.Model):
    __tablename__ = 'erp_menu'

    id = db.Column(db.String(6), primary_key=True, server_default=db.FetchedValue())
    title = db.Column(db.String(20), nullable=False, server_default=db.FetchedValue())
    icon = db.Column(db.String(50), nullable=False, server_default=db.FetchedValue())
    href = db.Column(db.String(50), nullable=False, server_default=db.FetchedValue())
    last = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
    pid = db.Column(db.String(6), nullable=False, server_default=db.FetchedValue())
    status = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
    notice = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue())
    updated_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
    created_time = db.Column(db.DateTime, nullable=False, server_default=db.FetchedValue())
